package com.dbdata.move.model;

import javax.persistence.*;
import java.util.Date;
import java.util.HashSet;
import java.util.Set;

/**
 * @author Zero
 */
@Entity
@Table(name = "DEMO")
public class Demo {
    //主键id
    private long id;
    //期班
    private long studentClass;
    //航空公司
    private long airLine;
    //分院1
    private long branchInfoByBranchOne;
    //分院2
    private long branchInfoByBranchTwo;
    //分院3
    private long branchInfoByBranchThree;
    //学生类型
    private long studentType;
    //大队
    private long organize;
    //学员姓名
    private String studentName;
    //学号
    private Integer studentid;
    //身份证
    private String identityCard;
    //名字拼音
    private String spellName;
    //入校时间
    private Date schoolInDate;
    //离校时间
    private Date schoolOutDate;
    //体检合格时间
    private Date qualifiedDate;
    //电话号码
    private Integer phoneNum;
    //自定义期班
    private String customClass;
    //性别
    private Integer sex;
    //民族
    private String nthnic;
    //籍贯
    private String hometown;
    //政治面貌
    private String politicallandscape;
    //家庭住址
    private String homeaddress;
    //邮编
    private Integer zipcode;
    //年级
    private String studentGrade;
    //班级名称
    private String className;
    //录入时间
    private Date loginDate;
//    private Set<Topic> topics = new HashSet<Topic>(0);
//    private Set<Hischange> hischanges = new HashSet<Hischange>(0);

    public Demo() {
    }

    public Demo(long id) {
        this.id = id;
    }

    public Demo(long id, long studentClass, long airLine,
                long branchInfoByBranchTwo, long studentType,
                long branchInfoByBranchThree,
                long branchInfoByBranchOne, long organize,
                String studentName, Integer studentid, String identityCard,
                String spellName, Date schoolInDate, Date schoolOutDate,
                Date qualifiedDate, Integer phoneNum, String customClass,
                Integer sex, String nthnic, String hometown,
                String politicallandscape, String homeaddress, Integer zipcode,
                String studentGrade, String className, Date loginDate) {
        this.id = id;
        this.studentClass = studentClass;
        this.airLine = airLine;
        this.branchInfoByBranchTwo = branchInfoByBranchTwo;
        this.studentType = studentType;
        this.branchInfoByBranchThree = branchInfoByBranchThree;
        this.branchInfoByBranchOne = branchInfoByBranchOne;
        this.organize = organize;
        this.studentName = studentName;
        this.studentid = studentid;
        this.identityCard = identityCard;
        this.spellName = spellName;
        this.schoolInDate = schoolInDate;
        this.schoolOutDate = schoolOutDate;
        this.qualifiedDate = qualifiedDate;
        this.phoneNum = phoneNum;
        this.customClass = customClass;
        this.sex = sex;
        this.nthnic = nthnic;
        this.hometown = hometown;
        this.politicallandscape = politicallandscape;
        this.homeaddress = homeaddress;
        this.zipcode = zipcode;
        this.studentGrade = studentGrade;
        this.className = className;
        this.loginDate = loginDate;
//        this.topics = topics;
//        this.hischanges = hischanges;
    }

    @Id
    @Column(name = "ID", unique = true, nullable = false)
    public long getId() {
        return this.id;
    }

    public void setId(long id) {
        this.id = id;
    }

    //    @ManyToOne(fetch = FetchType.LAZY)
    @Column(name = "STUDENT_CLASS")
    public long getStudentClass() {
        return this.studentClass;
    }

    public void setStudentClass(long studentClass) {
        this.studentClass = studentClass;
    }

    //    @ManyToOne(fetch = FetchType.LAZY)
    @Column(name = "AIRLINE_COMPANY")
    public long getAirLine() {
        return this.airLine;
    }

    public void setAirLine(long airLine) {
        this.airLine = airLine;
    }

    //    @ManyToOne(fetch = FetchType.LAZY)
    @Column(name = "BRANCH_TWO")
    public long getBranchInfoByBranchTwo() {
        return this.branchInfoByBranchTwo;
    }

    public void setBranchInfoByBranchTwo(long branchInfoByBranchTwo) {
        this.branchInfoByBranchTwo = branchInfoByBranchTwo;
    }

    //    @ManyToOne(fetch = FetchType.LAZY)
    @Column(name = "STUDENT_TYPE")
    public long getStudentType() {
        return this.studentType;
    }

    public void setStudentType(long studentType) {
        this.studentType = studentType;
    }

    //    @ManyToOne(fetch = FetchType.LAZY)
    @Column(name = "BRANCH_THREE")
    public long getBranchInfoByBranchThree() {
        return this.branchInfoByBranchThree;
    }

    public void setBranchInfoByBranchThree(long branchInfoByBranchThree) {
        this.branchInfoByBranchThree = branchInfoByBranchThree;
    }

    //    @ManyToOne(fetch = FetchType.LAZY)
    @Column(name = "BRANCH_ONE")
    public long getBranchInfoByBranchOne() {
        return this.branchInfoByBranchOne;
    }

    public void setBranchInfoByBranchOne(long branchInfoByBranchOne) {
        this.branchInfoByBranchOne = branchInfoByBranchOne;
    }

    //    @ManyToOne(fetch = FetchType.LAZY)
    @Column(name = "BRIGADE_NOW")
    public long getOrganize() {
        return this.organize;
    }

    public void setOrganize(long organize) {
        this.organize = organize;
    }

    @Column(name = "STUDENT_NAME", length = 30)
    public String getStudentName() {
        return this.studentName;
    }

    public void setStudentName(String studentName) {
        this.studentName = studentName;
    }

    @Column(name = "STUDENTID")
    public Integer getStudentid() {
        return this.studentid;
    }

    public void setStudentid(Integer studentid) {
        this.studentid = studentid;
    }

    @Column(name = "IDENTITY_CARD", length = 20)
    public String getIdentityCard() {
        return this.identityCard;
    }

    public void setIdentityCard(String identityCard) {
        this.identityCard = identityCard;
    }

    @Column(name = "SPELL_NAME", length = 50)
    public String getSpellName() {
        return this.spellName;
    }

    public void setSpellName(String spellName) {
        this.spellName = spellName;
    }

    @Temporal(TemporalType.TIMESTAMP)
    @Column(name = "SCHOOL_IN_DATE", length = 0)
    public Date getSchoolInDate() {
        return this.schoolInDate;
    }

    public void setSchoolInDate(Date schoolInDate) {
        this.schoolInDate = schoolInDate;
    }

    @Temporal(TemporalType.TIMESTAMP)
    @Column(name = "SCHOOL_OUT_DATE", length = 0)
    public Date getSchoolOutDate() {
        return this.schoolOutDate;
    }

    public void setSchoolOutDate(Date schoolOutDate) {
        this.schoolOutDate = schoolOutDate;
    }

    @Temporal(TemporalType.TIMESTAMP)
    @Column(name = "QUALIFIED_DATE", length = 0)
    public Date getQualifiedDate() {
        return this.qualifiedDate;
    }

    public void setQualifiedDate(Date qualifiedDate) {
        this.qualifiedDate = qualifiedDate;
    }

    @Column(name = "PHONE_NUM")
    public Integer getPhoneNum() {
        return this.phoneNum;
    }

    public void setPhoneNum(Integer phoneNum) {
        this.phoneNum = phoneNum;
    }

    @Column(name = "CUSTOM_CLASS", length = 20)
    public String getCustomClass() {
        return this.customClass;
    }

    public void setCustomClass(String customClass) {
        this.customClass = customClass;
    }

    @Column(name = "SEX")
    public Integer getSex() {
        return this.sex;
    }

    public void setSex(Integer sex) {
        this.sex = sex;
    }

    @Column(name = "NTHNIC", length = 10)
    public String getNthnic() {
        return this.nthnic;
    }

    public void setNthnic(String nthnic) {
        this.nthnic = nthnic;
    }

    @Column(name = "HOMETOWN", length = 10)
    public String getHometown() {
        return this.hometown;
    }

    public void setHometown(String hometown) {
        this.hometown = hometown;
    }

    @Column(name = "POLITICALLANDSCAPE", length = 20)
    public String getPoliticallandscape() {
        return this.politicallandscape;
    }

    public void setPoliticallandscape(String politicallandscape) {
        this.politicallandscape = politicallandscape;
    }

    @Column(name = "HOMEADDRESS", length = 80)
    public String getHomeaddress() {
        return this.homeaddress;
    }

    public void setHomeaddress(String homeaddress) {
        this.homeaddress = homeaddress;
    }

    @Column(name = "ZIPCODE")
    public Integer getZipcode() {
        return this.zipcode;
    }

    public void setZipcode(Integer zipcode) {
        this.zipcode = zipcode;
    }

    @Column(name = "STUDENT_GRADE", length = 20)
    public String getStudentGrade() {
        return this.studentGrade;
    }

    public void setStudentGrade(String studentGrade) {
        this.studentGrade = studentGrade;
    }

    @Column(name = "CLASS_NAME", length = 20)
    public String getClassName() {
        return this.className;
    }

    public void setClassName(String className) {
        this.className = className;
    }

    //    @Temporal(TemporalType.TIMESTAMP)
    @Column(name = "LOGIN_DATE", length = 0)
    public Date getLoginDate() {
        return this.loginDate;
    }

    public void setLoginDate(Date loginDate) {
        this.loginDate = loginDate;
    }

//    @ManyToMany(fetch = FetchType.LAZY)
//    @JoinTable(name = "student_topic", catalog = "cafuc", joinColumns = { @JoinColumn(name =
// "STUDENT_ID", nullable = false, updatable = false) }, inverseJoinColumns = { @JoinColumn(name
// = "TOPIC_ID", nullable = false, updatable = false) })
//    public Set<Topic> getTopics() {
//        return this.topics;
//    }
//
//    public void setTopics(Set<Topic> topics) {
//        this.topics = topics;
//    }
//
//    @OneToMany(fetch = FetchType.LAZY, mappedBy = "student")
//    public Set<Hischange> getHischanges() {
//        return this.hischanges;
//    }
//
//    public void setHischanges(Set<Hischange> hischanges) {
//        this.hischanges = hischanges;
//    }

}
